<?php
/**
 * ============================================================================
 * @copyright China International Consulting. 中国国际咨询
 * @version:  v1.0
 * @website   http://www.chinacons.com
 * ---------------------------------------------
 * $Date: 2007.12.17
*/

  $btn_sub = $_POST["btn_sub"];  //标识用户是否单击了完成按钮
  if (isset($btn_sub))
  {
    $zh_cate_title = work_str($_POST["zh_cate_title"], 1);				//中文分类名称
    $en_cate_title = work_str($_POST["en_cate_title"], 1);				//英文分类名称
	$other_cate_title = work_str($_POST['other_cate_title'],1);			//其他语言分类名称
	$cate_order = intval($_POST["cate_order"]);							//排列顺序
    $zh_cate_desc = work_str($_POST["zh_cate_desc"]);					//中文分类说明
	$en_cate_desc = work_str($_POST["en_cate_desc"]);					//英文分类说明
	$other_cate_desc = work_str($_POST['other_cate_desc']);				//其他语言分类说明

	$query = "UPDATE $TBL_CATE SET zh_cate_title='$zh_cate_title',en_cate_title='$en_cate_title',other_cate_title='$other_cate_title',cate_order=$cate_order,zh_cate_desc='$zh_cate_desc',en_cate_desc='$en_cate_desc',other_cate_desc='$other_cate_desc' WHERE cate_id=" . $cID;
    mysql_query($query) or die(mysql_error());
	MyNotice("修改成功",2,"news_cate.php?cID=$cID&cPath=$cPath");
	exit(0);
  }

  $tpl -> set_file(array("right" => "edit_cate.htm"));
  $query = "SELECT * FROM $TBL_CATE WHERE cate_id = " . $cID;
  $res = mysql_query($query) or die(mysql_error());
  $rows = @mysql_fetch_array($res);
  $tpl ->set_var($rows);
  $tpl -> parse("Output", "right");
  $right_page = $tpl -> get("Output");  
?>